package cn.zhuoluodada.opensource.smartdb.sqlbuilder;


import cn.zhuoluodada.opensource.smartdb.SmartDb;
import cn.zhuoluodada.opensource.smartdb.sqlbuilder.convertor.ColumnNameConverter;
import cn.zhuoluodada.opensource.smartdb.sqlbuilder.convertor.TableNameConverter;

public abstract class AbstractSqlBuilder {

    protected static final String BLANK = " ";
    protected static final String PARAM_PLACEHOLDER = "?";
    protected static final String LINE_SEPARATOR = System.getProperty("line.separator");

    protected TableNameConverter tableNameConverter;
    protected ColumnNameConverter columnNameConverter;

    protected SmartDb smartDb;

    protected StringBuilder appendSqlBuilder = new StringBuilder();

    public AbstractSqlBuilder(TableNameConverter tableNameConverter, ColumnNameConverter columnNameConverter) {
        this.tableNameConverter = tableNameConverter;
        this.columnNameConverter = columnNameConverter;
    }

    public AbstractSqlBuilder(SmartDb smartDb) {
        this.smartDb = smartDb;
        this.tableNameConverter = smartDb.getTableNameConverter();
        this.columnNameConverter = smartDb.getColumnNameConverter();
    }

}
